<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %><%--
  Created by IntelliJ IDEA.
  User: MyUser
  Date: 2025/3/6
  Time: 14:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>欢迎页面</title>
</head>
<body>
    <h1>
        welcome
        <%
            if(session.getAttribute("user")==null){
                response.sendRedirect("login.jsp");
            }

            IP地址:<%=request.getRemoteAddr() %>
            现在时间：<%=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())%>
        %>
    </h1>>
    <%
        response.setHeader("refresh","10");
    %>
</body>
</html>
